Movement detection method and device with adaptive double filtering

ABSTRACT

Movement detection method comprising the following steps:
         the calculation of a first mean M 1   n  of a signal S n  designed to be supplied by one pixel of a pixel matrix which corresponds to an n-th captured image, in function of the value of the signal S n  and/or a previous value M 1   n−1 ;   the calculation of a second mean M 2   n  of the signal S n  in function of a previous value M 2   n−1  and/or the value of the signal S n ;   the calculation of a signal Δ n =|M 1   n −M 2   n |;   the calculation of a third mean M 3   n  of the signal Δ n  or k. Δ n  in function of a previous value M 3   n−1  and/or the value of the signal Δ n ;   the comparison of the signals Δ n  and k.M 3   n  or Δ n  and M 3   n , wherein a movement is considered as detected when Δ n &gt;k.M 3   n  or Δ n &gt;M 3   n .

TECHNICAL FIELD

This document relates to the field of movement detection and moreparticularly that of image sensors, such as CMOS imaging devices used inthe visible or infrared range, wherein a movement detection method isused.

STATE OF THE PRIOR ART

Movement detection involves detecting the movement of moving elementswith respect to fixed elements in a field of captured images. Theseelements may be for example vehicles or even people. Such movementdetection consists of isolating, among the signals supplied by an imagesensor, those related to the moving elements, for example by detectingthe significant variations on the mean or variance of a signal of apixel or a group of pixels indicating a change in the nature of theelement captured in this pixel or group of pixels, with respect to thoserelated to the fixed elements of which the mean or variance remains forexample substantially constant in time. For this purpose, detectionmethods or algorithms are used.

A first approach consists of using a “recursive average” algorithm forsuch movement detection. This algorithm is based on an estimatedbackground calculation, which is to say of the fixed elements found inall of the captured images. Which is to say X_(n) is the background, orthe mean, corresponding to an image n, S_(n) is the signal correspondingto the acquired image n and 1/N is a weighting coefficient, therefore:

$X_{n} = {X_{n - 1} - {\frac{1}{N}X_{n - 1}} + {\frac{1}{N}S_{n}}}$

A comparison is then made between a chosen threshold value T_(h) and|S_(n)−X_(n)|. If the value obtained is positive, this means that amovement has been detected. X_(n) and S_(n) may be variables obtainedfrom a signal supplied by a pixel or by considering several signalssupplied by several pixels, for example a group of pixels located nextto one another that form a macropixel, like a single signal, taking forexample the mean of these signals.

Such an algorithm has especially as disadvantage a lack of robustness inthe detection as the detection threshold T_(h) is determined à priori,prior to the algorithm being used, and is global for all of the pixelsof the matrix. This disadvantage results in low precision of thelocation of the movements in the captured images. The low pass typefiltering carried out by this algorithm induces dephasing, andconsequently a delay in the response with respect to the signal. Thisdelay results in a drag effect which occurs downstream of the passage ofa moving element.

A second approach consists of using a “sigma-delta” algorithm for themovement detection. This algorithm permits significant variations of thesignal to be detected by calculating two variables that can beassimilated to the mean value and the variance of the signal. FIG. 1 isa diagrammatical representation of a movement detection device using asigma-delta algorithm.

Firstly, the sigma-delta mean M1 _(n) is calculated, with a constantincrementation and decrementation value, for example 1, of the signalS_(n) corresponding to the acquired image n. For this purpose, thesignal S_(n) is sent as an input of the first means of calculating thesigma-delta mean 2. These means 2 first carry out an initialisation M1₀=S₀. For the following images, which is to say for n>0, these means 2compare M1 _(n−1) and S_(n). If M1 _(n−1)<S_(n), then the value of M1_(n−1) is incremented such that M1 _(n)=M1 _(n−1)+1. If M1 _(n−1)>S_(n),then the value of M1 _(n−1) is decremented such that M1 _(n)=M1 _(n−1).The value of the signal Δ_(n)=|M1 _(n)−S_(n)| is calculated by asubtractor 4 and absolute value calculation means 6. The calculation ofN×Δ_(n) is then made by the multiplier 8, wherein N is a constantcorresponding to the adaptive threshold of the algorithm whose value ischosen in function of the complexity of the scene. The calculation of asigma-delta mean M2 _(n) of N.Δ_(n) is then made and sent as an input ofsecond means of calculating the sigma-delta mean 10. Next, theinitialisation M2 ₀=0 is carried out first. For the following images,which is to say for n>0, a comparison is made of M2 _(n−1) and N.Δ_(n).If M2 _(n−1)<N.Δ_(n), then the value of M2 _(n−1) is incremented suchthat M2 _(n)=M2 _(n−1)+1. If M2 _(n−1)>N.Δ_(n), then the value of M2_(n−1) is decremented such that M2 _(n)=M2 _(n−1)−1. Finally, acomparison is made by a comparator 12 of the signal Δ_(n) and M2 _(n).If M2 _(n)<Δ_(n), this means that a movement has been detected.

As for the recursive average algorithm, the variables S_(n), M1 _(n),Δ_(n) and M2 _(n) may be obtained from a signal supplied by a pixel orby considering several signals supplied by several pixels, for example agroup of pixels next to one another, like a single signal, taking forexample the mean of these signals.

However, such an algorithm especially has the disadvantage of notfiltering high frequency parasite movements which are considered asmovements to be detected (for example, a movement of the leaves of atree or snow falling). Furthermore, the constant N used must bedetermined à priori, which reduces the adaptability of the detectioncarried out by this algorithm.

DESCRIPTION OF THE INVENTION

Thus there is a need to propose a method of movement detection whichpermits the detection of high frequency parasite movements to be reducedor eliminated and which offers more efficient detection, for example interms of precision of locating the movements, with respect to themethods of the prior art, and which reduces or eliminates the “drag”effect obtained by the methods of the prior art.

Also, there is a need to propose a method of movement detection whichrequires few calculation and memory hardware resources to be used, andthat can be installed analogically in a very low consumption imagingdevice (with for example a mean consumption equal to approximatelyseveral hundred μW).

For this purpose, one embodiment proposes a method of movement detectioncomprising at least the following steps:

-   -   the calculation of a first mean M1 _(n) of a signal S_(n)        designed to be supplied by at least one pixel of a pixel matrix        which corresponds to an n-th captured image, in function of the        value of the signal S_(n) and/or a previous value M1 _(n−1);    -   the calculation of a second mean M2 _(n) of the signal S_(n) in        function of a previous value M2 _(n−1) and/or the value of the        signal S_(n);    -   the calculation of a signal Δ_(n)=|M1 _(n)−M2 _(n)|;    -   the calculation of a third mean M3 _(n) of the signal Δ_(n) or        k.Δ_(n) in function of a previous value M3 _(n−1) and/or the        value of the signal Δ_(n);    -   the comparison of the signals Δ_(n) and k.M3 _(n) when M3 _(n)        is the third mean of the signal Δ_(n), wherein a movement is        considered as detected when Δ_(n)>k.M3 _(n), or the comparison        of the signals Δ_(n) and M3 _(n) when M3 _(n) is the third mean        of the signal k.Δ_(n), wherein a movement is considered as        detected when Δ_(n)>M3 _(n);

where k: non-null positive real number, and

n: natural whole number.

Using adaptive double filtering, by adaptive calculation of two means,one designed to estimate the background and the other to detect thevariations in the captured images, band pass filtering may be generatedto eliminate the high frequency parasite movements, for example snowfalling, which constitute a noise and thus movements that are not to bedetected. This pass band filtering also enables to delete statisticalbackgrounds. The calculation of the difference of the two means M1 _(n)and M2 _(n) enables to only consider the objects which have a speed ofmovement comprised between these two means.

The adaptability of the detection is also improved by eliminatingcertain constants that had to determined à priori in the methods of theprior art. The sensitivity of the detection is also adapted locally tothe activity of the pixels, which is to say individually for each pixel.

The second mean M2 _(n) may be obtained from the following equation:

${{M\; 2_{n}} = {{M\; 2_{n - 1}} - {\frac{1}{N_{2}}M\; 2_{n - 1}} + {\frac{1}{N_{2}}S_{n}}}},$

where M2 ⁻¹=0, and

1/N₂: non-null positive real number.

By choosing an appropriate value of 1/N₂, the time constant of thecalculation of this second mean may be chosen, which may be rapid todetect the variations recorded during the movement detection.

The first mean M1 _(n) may be obtained from the following equation:

${{M\; 1_{n}} = {{M\; 1_{n - 1}} - {\frac{1}{N_{1}}M\; 1_{n - 1}} + {\frac{1}{N_{1}}S_{n}}}},$

where M1 ⁻¹=0, and

1/N₁: non-null positive real number.

Analogously to the choice of the value of 1/N₂, the choice of the valueof 1/N₁ may determine the time constant of the calculation of this firstmean, which may be slow to estimate the background of the capturedimages.

In one variant, the first mean M1 _(n) may be obtained at least by thefollowing calculation steps:

M1 ₀=S₀;

And for n>0:

M1_(n) =M1_(n−1) +c ₁ when M1_(n−1) <S _(n);

M1_(n) =M1_(n−1) −c ₁ when M1_(n−1) >S _(n);

where c₁: non-null positive real number.

The value of the first mean M1 _(n) may be greater than a first non-nullminimum threshold value S_(M1n).

The value of the second mean M2 _(n) may be greater than a secondnon-null minimum threshold value S_(M2n).

When M3 _(n) is the third mean of the signal Δ_(n), M3 _(n) may beobtained from the following equation:

${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}\Delta_{n}}}},$

where M3 ⁻¹=0, and

1/N₃: non-null positive real number.

When M3 _(n) is the third mean of the signal k.Δ_(n), M3 _(n) may beobtained from the following equation:

${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}{k \cdot \Delta_{n}}}}},$

where M3 ⁻¹=0, and

1/N₃: non-null positive real number.

In one variant, when M3 _(n) is the third mean of the signal Δ_(n), M3_(n) may be obtained at least by the following calculation steps:

M3 ₀=Δ₀;

And for n>0:

M3_(n) =M3_(n−1) +c ₃ when M3_(n−1)<Δ_(n);

M3_(n) =M3_(n−1) −c ₃ when M3_(n−1)>Δ_(n);

where c₃: non-null positive real number.

When M3 _(n) is the third mean of the signal k.Δ_(n), M3 _(n) may beobtained at least by the following calculation steps:

M3 ₀=k.Δ₀;

And for n>0:

M3_(n) =M3_(n−1) +c ₃ when M3_(n−1) <k.Δ _(n);

M3_(n) =M3_(n−1) −c ₃ when M3_(n−1) >k.Δ _(n);

where c₃: non-null positive real number.

The value of the third mean M3 _(n) may be greater than a third non-nullminimum threshold value S_(M3n).

The values of S_(M1n) and/or S_(M2n) and/or S_(M3n) may be comprisedbetween approximately 1/250×the dynamic of the signal S_(n) and 1/25×thedynamic of the signal S_(n), and for example equal to approximately1/50×the dynamic of the signal S_(n), the dynamic of the signal S_(n)corresponding to the possible maximum value of |S_(n)| (for exampleequal to 256 for a 8 bits coded signal).

The value of k may be between approximately 1.2 and 4.

The values of the weighting coefficients 1−N, as well as the values ofthe incrementation and decrementation coefficients c in the case of asigma-delta type mean calculation, may be calculated in function of thespeed of acquisition of the images, and may be easily determined. Thetime constant τ of a mean may be equal to the ratio: sampling period ofthe image capture/ln(1−1/N)⁻¹, the sampling period corresponding to theperiod of the signal S_(n) period (noted period(S_(n))).

The values of the weighting coefficients 1/N which may be used for thecalculation of means M1 _(n) and/or M2 _(n) and/or M3 _(n) may be chosensuch that the time constant τ of the first mean M1 _(n) is short, thatis lower than about 0.5 second (for example equal to 380 ms), and thatthe time constants τ of means M2 _(n) and/or M3 _(n) are long, that isgreater than about 1 second (for example equals to 1.18 s), at asampling period equal to 25 Hz.

The values of the incrementation and decrementation coefficients c whichmay be used for the calculation of means M1 _(n) and/or M3 _(n) may bechosen and adapted during the method in order to satisfy the relationc<|dS_(n)/dn|. In one variant, when the incrementation anddecrementation coefficients have fixed values, for example equal to 1,it is possible to adapt a refresh period Tn of the method, that is theperiod of which the steps of the method are realized, in order tosatisfy the relation c<|ΔS_(n)/Tn|.

The values of 1/N₁ and/or 1/N₂ and/or 1/N₃ may be chosen such that:

période(S _(n))/ln(1−1/N ₁)⁻¹<0.5 s;

période(S _(n))/ln(1−1/N ₂)⁻¹>1 s;

période(S _(n))/ln(1−1/N ₃)⁻¹>1 s;

and/or the values of c₁ and/or c₃ may verify the relation:c<|dS_(n)/dn|.

The calculation of the third mean M3 _(n) may be realized when Δ_(n) hasa non-null value.

Another embodiment also relates to a movement detection devicecomprising at least:

-   -   means of calculating, or a calculator of, a first mean M1 _(n)        of a signal S_(n) designed to be supplied by at least one pixel        of a pixel matrix and corresponding to an n-th captured image,        in function of the value of the signal S_(n) and/or a previous        value M1 _(n−1);    -   means of calculating, or a calculator of, a second mean M2 _(n)        of the signal S_(n) in function of a previous value M2 _(n−1)        and/or the value of the signal S_(n);    -   means of calculating, or a calculator of, a signal Δ_(n)=|M1        _(n)−M2 _(n)|;    -   means of calculating, or a calculator of, a third mean M3 _(n)        of the signal Δ_(n) or k.Δ_(n), in function of a previous values        M3 _(n−1) and/or the value of the signal Δ_(n);    -   means of comparing, or a comparator of, the signals Δ_(n) and        k.M3 _(n) when M3 _(n) is the third mean of the signal Δ_(n),        wherein a movement is considered as detected when Δ_(n)>k.M3        _(n), or means of comparing, or a comparator of, the signals        Δ_(n) and M3 _(n) when M3 _(n) is the third mean of the signal        k.Δ_(n), wherein a movement is considered as detected when        Δ_(n)>M3 _(n);

where k: non-null positive real number, and

n: natural whole number.

The means of calculating, or the calculator of, the second mean M2 _(n)may carry out at least the following operation:

${{M\; 2_{n}} = {{M\; 2_{n - 1}} - {\frac{1}{N_{2}}M\; 2_{n - 1}} + {\frac{1}{N_{2}}S_{n}}}},$

where M2 ⁻¹=0, and

1/N₂: non-null positive real number.

The means of calculating, or the calculator of, the second mean M2 _(n)may comprise at least two switched capacities connected in parallel toone another, wherein a first of the two capacities comprises a capacity

$C_{1} = \frac{N_{2} - 1}{N_{2}}$

and a second comprises a capacity

${C_{2} = \frac{1}{N_{2}}},$

where 1/N₂: non-null positive real number.

The means of calculating, or the calculator of, the first mean M1 _(n)may carry out at least the following operation:

${{M\; 1_{n}} = {{M\; 1_{n - 1}} - {\frac{1}{N_{1}}M\; 1_{n - 1}} + {\frac{1}{N_{1}}S_{n}}}},$

where M1 ⁻¹=0, and

1/N₁: non-null positive real number.

The means of calculating, or the calculator of, the first mean M1 _(n)may comprise at least two switched capacities connected in parallel toone another, wherein a first of the two capacities comprises a capacity

$C_{3} = \frac{N_{1} - 1}{N_{1}}$

and a second comprises a capacity

${C_{4} = \frac{1}{N_{1}}},$

where 1/N₁: non-null positive real number.

In one variant, the means of calculating, or the calculator of, thefirst mean M1 _(n) may comprise at least:

-   -   means of initialising the value of M1 ₀ to the value of S₀;    -   means of comparing, or a comparator of, the value of the signal        M1 _(n−1) and the value of the signal S_(n);    -   means of incrementing and decrementing the value of M1 _(n) by a        constant c₁, where c₁: non-null positive real number.

When M3 _(n) is the third mean of the signal Δ_(n), the means ofcalculating, or the calculator of, the third mean M3 _(n) may carry outat least the following operation:

${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}\Delta_{n}}}},$

where M3 ⁻¹=0, and

1/N₃: non-null positive real number.

When M3 _(n) is the third mean of the signal

k.Δ_(n), the means of calculating, or the calculator of, the third meanM3 _(n) may carry out at least the following operation:

${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}{k \cdot \Delta_{n}}}}},$

where M3 ⁻¹=0, and

1/N₃: non-null positive real number.

The means of calculating, or the calculator of, the third mean M3 _(n)may comprise at least two switched capacities connected in parallel toone another, wherein a first of the two capacities comprises a capacity

$C_{5} = \frac{N_{3} - 1}{N_{3}}$

and a second comprises a capacity

${C_{6} = \frac{1}{N_{3}}},$

where 1/N₃: non-null positive real number.

In one variant, when M3 _(n) is the third mean of the signal Δ_(n),means of calculating, or the calculator of, the third mean M3 _(n) maycomprise at least:

-   -   means of initialising the value of M3 ₀ to the value of Δ₀;    -   means of comparing the value of the signal M3 _(n−1) and the        value of the signal Δ_(n);    -   means of incrementing and decrementing the value of M3 _(n) by a        constant c₃, where c₃: non-null positive real number.

When M3 _(n) is the third mean of the signal k.Δ_(n), means ofcalculating, or the calculator of, the third mean M3 _(n) may compriseat least:

-   -   means of initialising the value of M3 ₀ to the value of k.Δ₀;    -   means of comparing the value of the signal M3 _(n−1) and the        value of the signal k.Δ_(n);    -   means of incrementing and decrementing the value of M3 _(n) by a        constant c₃, where c₃: non-null positive real number.

The means of comparison may comprise at least one operational amplifier,or transconductance amplifier.

Finally, another embodiment also relates to an image capture devicecomprising at least one pixel matrix and one movement detection deviceas previously described.

BRIEF DESCRIPTION OF THE DRAWINGS

This invention will be more clearly understood upon reading thefollowing description of embodiments provided purely by way ofillustration and in no way restrictively, in reference to the appendeddrawings in which:

FIG. 1 shows diagrammatically a sigma-delta algorithm movement detectiondevice,

FIG. 2 shows diagrammatically a double adaptive filtering movementdetection device,

FIG. 3 shows signals obtained during the implantation of a doubleadaptive filtering movement detection method,

FIG. 4 shows images of movements detected obtained by a sigma-deltaalgorithm movement detection method and by a double adaptive filteringmovement detection method,

FIG. 5 shows part of an image capture device comprising an example of adouble adaptive filtering movement detection device.

Identical, similar or equivalent parts of the various figures describedbelow have the same numerical references so as to facilitate the passagefrom one figure to another.

The different parts shown in the figures are not necessarily to auniform scale, to make the figures easier to read.

The different possibilities (variants and embodiments) should beunderstood as not being mutually exclusive and may be combined with oneanother.

DETAILED DESCRIPTION OF SPECIFIC EMBODIMENTS

A double adaptive filtering movement detection device 100 and method,using a RAE algorithm (“Recursive average and Estimator”), according toone specific embodiment will now be described in relation to FIG. 2.

A first step of this method is to estimate the background of the imagesin which a movement is to be detected, wherein the background is formedby the fixed elements in the captured images. For this purpose, firstly,using means 102, a first recursive average M1 _(n) is calculated whereinan important weighting coefficient 1/N₁ of a signal S_(n) correspondingto the signal supplied by a pixel, or a group of pixels also calledmacropixel, of an n-th acquired image. Wherein:

${M\; 1_{n}} = {{M\; 1_{n - 1}} - {\frac{1}{N_{1}}M\; 1_{n - 1}} + {\frac{1}{N_{1}}S_{n}}}$

In this calculation of the first mean M1 _(n), the choice of the valueof the weighting coefficient 1/N₁ is important so that only the fixedelements in the acquired images are conserved. For an image capturedevice operating at 25 Hz, for example a weighting coefficient such asN₁=2⁴ is chosen. The value of the weighting coefficient 1/N₁ is chosenin function of the amplitude and the frequency of the variations of thesignal S_(n).

Consequently, the value M1 _(n) calculated for a pixel or a macropixelcorresponds to the luminous intensity emitted by the fixed elementcaptured by this pixel or this macropixel, even if one or several movingelements temporarily pass before this pixel or this macropixel duringthe movement detection.

In one variant of this embodiment, the first mean M1 _(n) may not be arecursive average, but a sigma-delta mean, for example with a low levelof incrementation and decrementation c₁ (for example equal to 1), alsopermitting the estimation of the background to be calculated. This lowlevel of incrementation and decrementation corresponds to an importanttime constant in a recursive average calculation. For this purpose,firstly the initialisation M1 ₀=S₀ is carried out. For the followingimages, which is to say for n>0, M1 _(n−1) and S_(n) are compared. If M1_(n−1)<S_(n), then the value of M1 _(n−1) is incremented such that M1_(n)=M1 _(n−1)+c₁. If M1 _(n−1)>S_(n), then the value of M1 _(n−1) isdecremented such that M1 _(n)=M1 _(n−1)−c₁.

With respect to a recursive type average, a sigma-delta type mean valuehas the advantage of not directly depending on the amplitude of thevariations of the signal for which the mean is calculated.

In parallel to the calculation of this first mean M1 _(n), of therecursive or sigma-delta type, calculation means 104 calculate a secondrecursive average M2 _(n), with a low weighting coefficient 1/N₂, of thesignal S_(n). This provides:

${M\; 2_{n}} = {{M\; 2_{n - 1}} - {\frac{1}{N_{2}}M\; 2_{n - 1}} + {\frac{1}{N_{2}}S_{n}}}$

By choosing the low weighting coefficient 1/N₂, for example equal to1/2², a filtering of the high frequency parasite elements (for examplemoving leaves of trees or falling rain or snow) is realized. Theweighting coefficient 1/N₂ is chosen in function of the amplitude andthe frequency of the variations of the captured signal S_(n).

Then the signal Δ_(n)=|M1 _(n)−M2 _(n)| is calculated using a subtractor106 and absolute value calculation means 108.

The device 100 also comprises means 110 of calculating a third mean M3_(n), for example recursive with an important weighting coefficient1/N₃, of the signal Δ_(n). This third recursive mean M3 _(n) is obtainedusing the following calculation:

${M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}\Delta_{n}}}$

The weighting coefficient 1/N₃ is chosen in function of the amplitudeand the frequency of the variations of the captured signal S_(n). Forexample N₃=2⁶. The value of the operating frequency of the movementdetection device also intervenes in the choice of the value of theweighting coefficient 1/N₃.

In one variant, the third mean M3 _(n) may not be a recursive average,but a sigma-delta mean, for example with a constant incrementation anddecrementation level c₃ (for example equal to 1). For this purpose,firstly the initialisation M3 ₀=Δ₀ is made. For the following images,which is to say for n>0, M3 _(n−1) and Δ_(n) are compared. If M3_(n−1)<Δ_(n), then the value of M3 _(n−1) is incremented such that M3_(n)=M3 _(n−1)+c₃. If M3 _(n−1)>Δ_(n), then the value of M3 _(n−1) isdecremented such that M3 _(n)=M3 _(n−1)−c₃.

Finally, to determine the presence or absence of movements in thecaptured image n, the device 100 comprises a comparator 114 which makesa comparison of the signal Δ_(n) and the product of the third mean M3_(n) by an amplification constant k obtained at the output of amultiplier 112. The value of k is chosen in function of the operatingfrequency of the image capture device capturing the images processed.For example, k may have a value approximately between 1.2 and 4, or forexample approximately between 1.5 and 2.5 for an image capture deviceoperating at 25 Hz. If Δ_(n)>k.M3 _(n), this means that a movement hasbeen detected in the captured images.

In one variant, M3 _(n) may corresponds to the mean of the product ofthe signal Δ_(n) and the amplification constant k. In the case of arecursive third mean M3 _(n), M3 _(n) may be obtained using thefollowing calculation:

${M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}{k \cdot \Delta_{n}}}}$

In the case of a sigma-delta third mean M3 _(n), the initialisation M3₀=k.Δ₀ is first made. For the following images, which is to say for n>0,M3 _(n−1) and k.Δ_(n) are compared. If M3 _(n−1)<k.Δ_(n), then the valueof M3 _(n−1) is incremented such that M3 _(n)=M3 _(n−1)+c₃. If M3_(n−1)>k.Δ_(n), then the value of M3 _(n−1) is decremented such that M3_(n)=M3 _(n−1)−c₃. Finally, when M3 _(n) is the mean of k.Δ_(n), thecomparator 114 makes a comparison of the signal Δ_(n) and the third meanM3 _(n). If Δ_(n)>M3 _(n), this means that a movement has been detectedin the captured images.

On FIG. 2, this variant wherein M3 _(n) is the mean of k.Δn correspondsto an emplacement of the multiplier 112 between the means of calculating110 and the absolute value calculation means 108, the multiplier 112receiving on its inputs the signals Δ_(n) and k, and outputting thesignal k.Δ_(n) on the input of the means of calculating 110.

This method is based on the generation of two adaptive means, which isto say a first recursive or sigma-delta average and a second recursiveaverage, each with their own weighting coefficients 1/N₁ (or c₁ in thecase of a first sigma-delta type mean) and 1/N₂, respectively estimatingthe background and filtering the high frequency parasite movements. Thethresholding of the variations detected is therefore adaptive asamplification is made with the third mean M3 _(n) of the absolutedifference of the two previous first means M1 _(n) and M2 _(n).

In general, the incrementation and decrementation values c₁ and/or c₃and/or the weighting coefficients 1/N1, 1/N₂ and 1/N₃ used in the meanscalculations are adapted in function of the pixel resolution of thecaptured images, which is to say the number of levels of grey onto whichthe processed signal is encoded, as well as the operating frequency ofthe movement detection device 100.

FIG. 3 shows an example of a signal S_(n) from several images capturedby a pixel matrix as well as the different signals calculated during anadaptive double filtering movement detection method previouslydescribed.

In this FIG. 3, the x axis shows the evolution of the signals, graduatedin the number of captured images, and the y axis shows the value ofthese signals graduated in the levels of grey. The curve 120 shows thesignal S_(n) obtained at the output of a pixel or a macropixel. It isthis signal that is sent to the input of the device 100. The curve 122shows the first mean M1 _(n), in this case recursive, obtained at theoutput of the calculation means 102. This first mean M1 _(n) shows thebackground of the image captured, which is to say the fixed element(s)captured by the pixel or the group of pixels. In FIG. 3, it can be seenthat this first mean M1 _(n) varies very little, which effectivelycorresponds to the value of the fixed elements captured. The curve 124shows the second mean M2 _(n) obtained at the output of the calculationmeans 104. It may be seen in FIG. 3 that this second mean M2 _(n)follows the most significant variations of the output signal S_(n)according to the curve 120, thus creating an estimation of thevariations, which is to say of the moving elements in the capturedimages. Finally, the curves 126, 128 and 130 respectively show thesignals Δ_(n), M3 _(n) and k.M3 _(n). In this embodiment, theamplification constant k is equal to 2. In FIG. 3, it may be seen thatthe cross hatched part 132 corresponds to a period of time T1 duringwhich Δ_(n)>k.M3 _(n), which is to say during which a movement isdetected. It may be seen in this FIG. 3 that a movement is detectedduring the time period T1 during which the signal of the curve 2 variesthe most, which is to say by capturing an important movement.Consequently, by correctly choosing the value of the weightingcoefficient for the calculation of the second mean M2 _(n), the highfrequency parasite movements corresponding to the low variationsrecorded by the image capture device are not considered as detectedmovements.

It is possible to impose a minimum threshold value S_(M3n) below whichthis mean value M3 _(n) is not allowed to drop. For example, in thisembodiment, the value of S_(M3n) may be equal to about 1/50×the dynamicof the signal S_(n).

FIG. 4 shows results obtained by the use of a sigma-delta algorithmmovement detection according to the prior art (image on the left) andmovement detection using a double adaptive filtering movement detectionmethod as previously described (image on the right). In these twoimages, the light zones show the moving objects detected. In the imageon the left, it can be seen that the sigma-delta algorithm has allowedthe vehicles in movement to be detected, but has also consideredprecipitations (falling snow in this case) as movements to be detected.In the image on the right, it can be seen that the double adaptivefiltering movement detection method has indeed considered the movingvehicles and has correctly considered the falling snow as high frequencyparasite movements that are not to be taken into account.

One example of an image capture device 200, or optical imaging device,permitting a double adaptive filtering movement detection methodpreviously described to be implemented is shown in FIG. 5.

The image capture device 200 comprises pixel matrix 202 and a movementdetection device 204. Each pixel of the matrix 202 is here formed by aphotodiode and addressing and reading transistors. The double adaptivefiltering movement detection method previously described may be appliedto the signal S_(n) supplied by a pixel, by connecting a movementdetection device similar to the device 204 to each column of pixels ofthe matrix 202. It is also possible that the movement detection methodis applied to a signal S_(n) corresponding to the signals supplied byseveral pixels, for example the mean of these signals. Consequently, byconsidering the macropixels, it is possible to operate the image capturedevice 200 in low resolution zones, and only to detail these zones byusing a double adaptive filtering movement detection method for eachpixel of a macropixel when a movement is detected on this macropixel. Itis therefore possible to reduce the number of movement detection devices204 used in the image capture device 200 by only using a single movementdetection device 204 per column of macropixels. A macropixel may forexample be a square of 12×12 pixels, or any other value, for example 4×4pixels as in FIG. 5. The values of each macropixel of the matrix 202 areread line by line.

The movement detection devices 204 shown in FIG. 5 comprises acomparator 206, for example an operational amplifier (ortransconductance amplifier), a plurality of switched capacities 208,analogue memory registers 210 (three memory registers 210 are shown inFIG. 5 but the movement detection device 204 may comprise a differentnumber of memory registers adapted to the number of values to be storedwhile the movement detection method is in use), an address demultiplexer212 a, an address multiplexer 212 b, a multiplexer 214 for controllingthe writing in the switched capacities 208, a multiplexer 216 supplyingthe values to be written in the switched capacities 208, a SRAM memory218, capacitors 220 designed to obtain different values of amultiplication coefficient k and a capacitor 222.

The operation of the movement detection device 204 will now be describedin relation to the implementation of the movement detection methodpreviously described.

In the case of a first mean M1 _(n) of the recursive type, the value ofthe signal M_(n−1) stored in one of the memory registers 210 is suppliedto the input of the multiplexer 216, by means of the address multiplexer212 b. When n=0, M⁻¹=0. The first recursive mean M1 _(n) is thencalculated. For this purpose, the signal M_(n−1) is sent to theterminals of a first switched capacity 208 whose value C₃ is equal to(N₁−1)/N₁. The value of the signal M_(n−1) is stored at the terminals ofthis capacity.

The signal S_(n) supplied by the first macropixel of the matrix 202 isthen supplied to the input of the multiplexer 216. The value of thesignal S_(n) is stored at the terminals of a second switched capacitywhose value C₄ is equal to 1/N₁.

By connecting in parallel the two switched capacities of values C₃ andC₄, the signal

${M\; 1_{n}} = {{M\; 1_{n - 1}} - {\frac{1}{N_{1}}M\; 1_{n - 1}} + {\frac{1}{N_{1}}S_{n}}}$

is obtained at the terminals of these capacities.

It is also possible that the mean M1 _(n) is a sigma-delta mean. Forthis purpose, the initialisation M1 ₀=S₀ is carried out by storing thevalue of the signal S₀ in one of the memory registers 210. For thefollowing images, M1 _(n−1) and S_(n) are compared by applying one ofthe two signals to the positive input of the comparator 206 by means ofthe capacitor 222 in which this signal is stored, and by applying theother of the two signals to the negative input of the comparator 206.The result obtained at the output of the comparator 206 the permits oneof the values +c₁ or −c₁ applied to the input of the multiplexer 216 (+cand −c in FIG. 5) to be selected. If M1 _(n−1)<S_(n), then the value ofM1 _(n−1) is incremented such that M1 _(n)=M1 _(n−1)+c₁. If M1_(n−1)>S_(n), then the value of M1 _(n−1) is decremented such that M1_(n)=M1 _(n−1)−c₁. In this embodiment, c₁=1. The addition operation of±c₁ à M1 _(n−1) is carried out by means of the capacities 208 by storingat the terminals of two of these capacities the ±c₁ and M1 _(n−1)values, and by connecting these capacities in series so as to carry outan addition.

Whether the mean M1 _(n) is of the recursive or sigma-delta type, itsvalue is stored in one of the memory registers 210. In this embodiment,the movement detection device 204 comprises three memory registers 210designed to store three different means M1 _(n), M2 _(n) and M3 _(n).

In a similar manner to the calculation of the first mean M1 _(n) whenthe latter is of the recursive type, the calculation of the secondrecursive mean M2 _(n) is carried out. This calculation is made by usinganother of the memory registers 210 and two other switched capacities ofthe set-up 208 with values C₁ and C₂, respectively of values (N₂−1)/N₂and 1/N₂.

Then the signal Δ_(n)=|M1 _(n)−M2 _(n)| is calculated. This operationmay be carried out by means of the switched capacities 208.

In a similar manner to the calculation of the first mean M1 _(n), thecalculation of the third mean M3 _(n) is carried out. As for the firstmean M1 _(n), the third mean M3 _(n) may be of the sigma-delta type orthe recursive type. This calculation is implemented by the same elementsof the device 204 as those used to calculate the first mean M1 _(n) whenM1 _(n) and M3 _(n) are of the same type.

A comparison is then made using the amplifier 206 of the signal Δ_(n)and the product of the third mean M3 _(n) by an amplification constant kwhose value is obtained by the ratio between one of the capacities 220and another of the switched capacities 208, or between the signal Δ_(n)and the third mean M3 _(n) when M3 _(n) corresponds to the third mean M3_(n) of k.Δ_(n). The value obtained at the output of the amplifier 206is representative of a detection or non-detection of a movement on themacropixel considered. If Δ_(n)>k.M3 _(n) (or Δ_(n)>M3 _(n) when M3 _(n)corresponds to the third mean M3 _(n) of k.Δ_(n)), then it is consideredthat a movement has been detected on the macropixel considered.

The operation is then repeated for the following macropixels, line afterline.

During the calculations of the third mean M3 _(n), a minimum thresholdvalue may be imposed, below which this mean is not allowed to descend.This minimum threshold value S_(M3n) may be applied to the input of themultiplexer 216. When the value of this mean is below this thresholdvalue, the value of M3 _(n) is then replaced by the threshold valueS_(M3n).

When a movement is detected on the macropixel, it is possible, for animage n for which the movement detection has been carried out onmacropixels, to store the values of the macropixels in the memory 218,then, on the macropixel(s) where movements are recorded, to implementthe movement detection method previously described for each of thepixels of the macropixel. Consequently, the location of the movementsdetected may be defined precisely, without processing all of the pixelsof the captured images.

It may be seen that the method may be implemented using few hardwarecalculation resources (an operational amplifier, several switchedcapacities with a clock frequency for the instructions of several tensof kHz and several multiplexers/demultiplexers) and memory resources(several analogue registers per pixel and a SRAM memory for example).

The device shown in FIG. 5 permits an analogue implementation of themovement detection method previously described. However, it is alsopossible to use a digital implementation of the movement detectionmethod by connecting the pixel matrix 202 to signal digital processingmeans, for example a circuit of the DSP or FPGA type or amicroprocessor, wherein the movement detection method is programmed.

The signals obtained at the output of the movement detection devices maybe used to display an image on which the background captured forms ablack background onto which the moving elements detected are shown inwhite, for example as shown on the image on the right in FIG. 4.

1. A movement detection method comprising at least the following steps:the calculation of a first mean M1 _(n) of a signal S_(n) designed to besupplied by at least one pixel of a pixel matrix which corresponds to ann-th captured image, in function of the value of the signal S_(n) and/ora previous value M1 _(n−1); the calculation of a second mean M2 _(n) ofthe signal S_(n) in function of a previous value M2 _(n−1) and/or thevalue of the signal S_(n); the calculation of a signal Δ_(n)=|M1 _(n)−M2_(n)|; the calculation of a third mean M3 _(n) of the signal Δ_(n) ork.Δ_(n) in function of a previous value M3 _(n−1) and/or the value ofthe signal Δ_(n); the comparison of the signals Δ_(n) and k.M3 _(n) whenM3 _(n) is the third mean of the signal Δ_(n), wherein a movement isconsidered as detected when Δ_(n)>k.M3 _(n), or the comparison of thesignals Δ_(n) and M3 _(n) when M3 _(n) is the third mean of the signalk.Δ_(n), wherein a movement is considered as detected when Δ_(n)>M3_(n); where k: non-null positive real number, and n: natural wholenumber.
 2. The method according to claim 1, wherein the second mean M2_(n) is obtained from the following equation:${{M\; 2_{n}} = {{M\; 2_{n - 1}} - {\frac{1}{N_{2}}M\; 2_{n - 1}} + {\frac{1}{N_{2}}S_{n}}}},$where M2 ⁻¹=0, and 1/N₂: non-null positive real number.
 3. The methodaccording to claim 1, wherein the first mean M1 _(n) is obtained fromthe following equation:${{M\; 1_{n}} = {{M\; 1_{n - 1}} - {\frac{1}{N_{1}}M\; 1_{n - 1}} + {\frac{1}{N_{1}}S_{n}}}},$where M⁻¹=0, and 1/N₁: non-null positive real number.
 4. The methodaccording to claim 1, wherein the first mean M1 _(n) is obtained with atleast the following calculation steps: M1 ₀=S₀; and for n>0:M1_(n) =M1_(n−1) +c ₁ when M1_(n−1) <S _(n);M1_(n) =M1_(n−1) −c ₁ when M1_(n−1) >S _(n); where c₁: non-null positivereal number.
 5. The method according to claim 1, wherein, when M3 _(n)is the third mean of the signal Δ_(n), the third mean M3 _(n) isobtained from the following equation:${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}\Delta_{n}}}},$and when M3 _(n) is the third mean of the signal k.Δ_(n), M3 _(n) isobtained from the following equation:${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}{k \cdot \Delta_{n}}}}},$where M3 ⁻¹=0, and 1/N₃: non-null positive real number.
 6. The methodaccording to claim 1, wherein, when M3 _(n) is the third mean of thesignal Δ_(n), the third mean M3 _(n) is obtained with at least thefollowing calculation steps: M3 ₀=Δ₀; and for n>0:M3_(n) =M3_(n−1) +c ₃ when M3_(n−1)<Δ_(n);M3_(n) =M3_(n−1) −c ₃ when M3_(n−1)>Δ_(n); and when M3 _(n) is the thirdmean of the signal k.Δ_(n), M3 _(n) is obtained at least by thefollowing calculation steps: M3 ₀=k.Δ₀; and for n>0:M3_(n) =M3_(n−1) +c ₃ when M3_(n−1) <k.Δ _(n);M3_(n) =M3_(n−1) −c ₃ when M3_(n−1) >k.Δ _(n); where c₃: non-nullpositive real number.
 7. The method according to claim 1, wherein thevalue of the third mean M3 _(n) is greater than a third non-null minimumthreshold value S_(M3n).
 8. The method according to claim 1, wherein thevalue of S_(M3n) is comprised between approximately 1/250×the dynamic ofthe signal S_(n) and 1/25×the dynamic of the signal S_(n).
 9. The methodaccording to claim 1, wherein the value of k is approximately between1.2 and
 4. 10. The method according to claim 1, wherein the values of1/N₁ and/or 1/N₂ and/or 1/N₃ are chosen such that:période(S _(n))/ln(1−1/N ₁)⁻¹<0.5 s;période(S _(n))/ln(1−1/N ₂)⁻¹>1 s;période(S _(n))/ln(1−1/N ₃)⁻>1 s; and/or the values of c₁ and/or c₃verify the relation:c<|dS _(n) /dn|.
 11. The method according to claim 1, wherein thecalculation of the third mean M3 _(n) is realized when Δ_(n) has anon-null value.
 12. A movement detection device comprising at least:means of calculating a first mean M1 _(n) of a signal S_(n) designed tobe supplied by at least one pixel of a pixel matrix and corresponding toan n-th captured image, in function of the value of the signal S_(n)and/or a previous value M1 _(n−1); means of calculating a second mean M2_(n) of the signal S_(n) in function of a previous value M2 _(n−1)and/or the value of the signal S_(n); means of calculating a signalΔ_(n)=|M1 _(n)−M2 _(n)|; means of calculating a third mean M3 _(n) ofthe signal Δ_(n) or k.Δ_(n), in function of a previous values M3 _(n−1)and/or the value of the signal Δ_(n); means of comparing the signalsΔ_(n) and k.M3 _(n) when M3 _(n) is the third mean of the signal Δ_(n),wherein a movement is considered as detected when Δ_(n)>k.M3 _(n), ormeans of comparing the signals Δ_(n) and M3 _(n) when M3 _(n) is thethird mean of the signal k.Δ_(n), wherein a movement is considered asdetected when Δ_(n)>M3 _(n); where k: non-null positive real number, andn: natural whole number.
 13. The device according to claim 12, whereinthe means of calculating the second mean M2 _(n) carry out at least thefollowing operation:${{M\; 2_{n}} = {{M\; 2_{n - 1}} - {\frac{1}{N_{2}}M\; 2_{n - 1}} + {\frac{1}{N_{2}}S_{n}}}},$where M2 ⁻¹=0, and 1/N₂: non-null positive real number.
 14. The deviceaccording to claim 12, wherein the means of calculating the first meanM1 _(n) carry out at least the following operation:${{M\; 1_{n}} = {{M\; 1_{n - 1}} - {\frac{1}{N_{1}}M\; 1_{n - 1}} + {\frac{1}{N_{1}}S_{n}}}},$where M1 ⁻¹=0, and 1/N₁: non-null positive real number.
 15. The deviceaccording to claim 12, wherein the means of calculating the first meanM1 _(n) at least comprise: means of initialising the value of M1 ₀ tothe value of S₀; means of comparing the value of the signal M1 _(n−1)and the value of the signal S_(n); means of incrementing anddecrementing the value of M1 _(n) by a constant c, where c: non-nullpositive real number.
 16. The device according to claim 12, wherein,when M3 _(n) is the third mean of the signal Δ_(n), the means ofcalculating the third mean M3 _(n) carry out at least the followingoperation:${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}\Delta_{n}}}},$and when M3 _(n) is the third mean of the signal k.Δ_(n), the means ofcalculating the third mean M3 _(n) carry out at least the followingoperation:${{M\; 3_{n}} = {{M\; 3_{n - 1}} - {\frac{1}{N_{3}}M\; 3_{n - 1}} + {\frac{1}{N_{3}}{k \cdot \Delta_{n}}}}},$where M3 ⁻¹=0, and 1/N₃: non-null positive real number.
 17. The deviceaccording to claim 12, wherein, when M3 _(n) is the third mean of thesignal Δ_(n), the means of calculating the third mean M3 _(n) at leastcomprise: means of initialising the value of M3 ₀ to the value of Δ₀;means of comparing the value of the signal M3 _(n−1) and the value ofthe signal Δ_(n); means of incrementing/decrementing the value of M3_(n) by a constant c₃, where c₃: non-null positive real number; and whenM3 _(n) is the third mean of the signal k.Δ_(n), means of calculatingthe third mean M3 _(n) comprise at least: means of initialising thevalue of M3 ₀ to the value of k.Δ₀; means of comparing the value of thesignal M3 _(n−1) and the value of the signal k.Δ_(n); means ofincrementing and decrementing the value of M3 _(n) by a constant c₃,where c₃: non-null positive real number.
 18. An image capture devicecomprising at least one pixel matrix and one movement detection deviceaccording to claim 12.